import numpy as np
import cv2

img=np.zeros((300,300))
#对某一点的像素进行设置
img[:,10]=255
img[10,:]=255
cv2.imshow('cool',img)
cv2.waitKey(0)